require 'tk'

justify = TkVariable.new
justify.value = "Left"
root = TkRoot.new(title:"hello kitty")

mb = TkMenuButton.new{
	width 9
	textvariable justify
	#menu m
	grid row:0,column:1,sticky:"w"
}

m = TkMenu.new(mb){
	tearoff 0
}

mb.configure(menu:m)

%w[Left Center Right Justified].each do |x|
	#m.add(:radiobutton,value:x,variable:justify,label:x)
	m.add_radiobutton(value:x,variable:justify,label:x);
end

#puts m[]

TkLabel.new{
	text "Alignment:"
	grid row:0,column:0,sticky:"e"
}

Tk.mainloop